'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller, middleware } = app;
  router.get('/', middleware.err(), controller.home.index);

  // 登录
  router.post('/api/login', controller.login.index);
  // 获取用户信息
  router.get('/api/getUserInfo', controller.login.user);

  router.post('/api/giteeLoign', controller.login.giteeLogin);

  router.post('/api/upload', controller.upload.index);

};
